 <!DOCTYPE html>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="/pad/common/commonCss.jsp"/>
  <script src="${basePath}pad/commonJs/jquery.min.js"></script>
<script src="${basePath}pad/commonJs/jquery.imageScroller.js"></script>
<script src="${basePath}pad/commonJs/jquery.easyui.min.js"></script>
<script src="${basePath}pad/commonJs/jt_normal.js"></script>
<script src="${basePath}pad/commonJs/jt_select.js"></script>
<script src="${basePath}pad/commonJs/tags/dialog/dialog.js"></script>
<script type="text/javascript" src="${basePath }pad/commonJs/jt_map.js"></script>
<script  type="text/javascript" src="${basePath }pad/commonJs/tags/page/page.js"></script>
<script type="text/javascript" src="${basePath }pad/commonJs/tags/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
var fujiaPrdArray=[];
var basePath = "${basePath}";
var trimPrdArray=[];
var maxCntRoomArray=[];
var pkParresIdOld ='${pkParresId}';
var pkOrderIdOld='${pkOrderId}';
var parStatus=new Array("未预付","自动取消","取消","待确认","已确认","进行中","完成","删除");
$(document).ready(function() {
	var grpFlag ='${parType}';
	if(grpFlag==0){
	$("input[@type=radio][id=r1]").attr("checked",true);
	}else{
		$("input[@type=radio][id=r2]").attr("checked",true);
	}
	var now=new Date();
	var dateNows= now.toLocaleDateString();
	var hours=now.getHours();
	var minutes=now.getMinutes();
	var seconds=now.getSeconds();
	var modiTimevalue =dateNows +" " +hours+":"+minutes+":"+seconds;
	$("#modiTimedis").val(modiTimevalue);
	loadAlreadyRoom();
	//===================
	 var maxCntlistRoom ='${listRoom}';
	 if(null!=maxCntlistRoom){
		 <c:forEach items="${listRoom}" var="room" varStatus="status">
				 maxCntRoomArray.push("${room.pkRoomId}@${room.roomName}@${room.maxCnt}@${room.minCnt}"); //此处的 数组 是为了  方便 验证总人数不能超过房间最大容量，否则提示“房间容量超限”
				 </c:forEach>
	 }
	 //=====================
	loadTypeTimeValue();
	loadParStatus();
	loadParTaocan();
	loadQCengTaocan();
	 alreadyZhu();
	 alreadyYinl();
	 alreadyPeiCai();
	 document.getElementById("dfujiaTableDiv").style.display='block';

	 if(pkParresIdOld!=""){
		 var basicPkg2old='${parreserveOld.basicPkg2}';
		 if(basicPkg2old!=""){
			 fujiaPrdArray=basicPkg2old.split(",");
		 }
		 var basicPkg3old='${parreserveOld.basicPkg3}';
		 if(basicPkg3old!=""){
			 trimPrdArray=basicPkg3old.split(",");
		 }
		 $("#fujiaTable").remove();
		 document.getElementById("addfujiaTableDiv").style.display='block';
		 addTrFujia();
		 $("#trimmingtable").remove();
		 document.getElementById("addtrimmingtableDiv").style.display='block';
		 addTrming();
	 }else{
		 fujiaPrdArray=[];
		 trimPrdArray=[];
		 initTrFujia();
		 initTrming();
	 }
	 $("input[name=pkRoomId]").click(function(){
		  showCont();
		 });
});



function showCont(){

	var roomIdArray=[];
	$("input[name=pkRoomId]:checked").each(function(){
		// var roomId =this.id;
	 	roomIdArray.push(this.value);
	 });

	 if(roomIdArray.length==0){
		$("#paidukaishi").empty();
		refreshSelect();
	 } else {
		var paiduikValue =$("#paidukaishi").val();
		$("#paidukaishi").empty();
	 	var url ='${basePath }parreserve/getRoomTime.shtml';
	
		$.ajax({
			url : url,
			type : 'POST',
			data : 'paiduikValue='+paiduikValue+'&roomIdArray=' + roomIdArray+'&paiduikDate=' + $("#presDay").val()+'&pkParresId=' + $("#pkParresId").val(),
			async : false,
			error : function(XMLHttpRequest) {
				ajaxError(XMLHttpRequest);
			},
			success : function(data) {

				$("#paidukaishi").empty();
				if (null == data || data.length == 0) {
					alertError("没有共同时间段！");
					refreshSelect();
					return;
					
				}
				$("#paidukaishi").append('<option value="">请选择</option>');
				$.each(data , function(index, item) {
					var itemText =item.substring(0,2)+":"+item.substring(2,4)+"-"+item.substring(5,7)+":"+item.substring(7,9);
					$("#paidukaishi").append('<option value="'+item+'">'+itemText+'</option>'); 
				});
				$("#paidukaishi").attr("value",paiduikValue);
				refreshSelect();
			}

		});
	}
		//===	 
}
	function loadTypeTimeValue() {
		var resTimeS = '${parreserveOld.resTimeS}';
		var resTimeE = '${parreserveOld.resTimeE}';
		var overTime = '${parreserveOld.overTime}';
		var parCtypeId = '${parreserveOld.fkPartypeId}';
		$("#overTime").val(overTime);
		var fkOtprdId ='${parreserveOld.fkOtprdId}';
		$("#fkOtprdId").val(fkOtprdId);
		var paiduikValue = resTimeS + "-" + resTimeE;
		$("#paidukaishi").val(paiduikValue);
		$("#fkPartypeId").val(parCtypeId);
		refreshSelect();
	}
	function initTab(formId, tableId, footId, initTr) {
		var form = $("#" + formId);
		var pagebean = new PageBean(form);
		pagebean.setCallback(initTr);
		pagebean.setFootId(footId);
		pagebean.setTableId(tableId);
		setPagebeanObj(pagebean);
		pagebean.doPage();
	}

	function initTabTrim(formId, tableId, footId, initTr) {
		var form = $("#" + formId);
		var pagebean = new PageBean(form);
		pagebean.setCallback(initTr);
		pagebean.setFootId(footId);
		pagebean.setTableId(tableId);
		setPagebeanObj(pagebean);
		pagebean.doPage();
	}
	function saveInputNum(typeLength){
		var paidukaishi = $("#paidukaishi").val();
		if (paidukaishi == "") {
			$.messager.alert('提示', '请选择时间！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return;
		}
		//===
		var pkRoomIdtr = checkRoomId();
		$("#roomIds").val(pkRoomIdtr);
		var resDay = $("#presDay").val();
		var valdateTaocan = validaUTaocan();
		var taocanPid =getNowWeekDayToPrdId(resDay);
		$("#basicPkg").val(taocanPid+"#"+ valdateTaocan);
	//===
		var url = '${basePath }parreserve/updateYazhengNum.shtml';
		$
				.ajax({
					url : url,
					type : 'POST',
					data : $("#form1").serialize(),//序列化表单里所有的内容
					async : false,
					error : function(XMLHttpRequest) {
						ajaxError(XMLHttpRequest);
					},
					success : function(data) {
						if (null != data && data != "") {
							if (data.indexOf("@@") != -1) {
								var pkParresIdOld = data.substring(0, data
										.indexOf("@@"));
								window.location.href = "${basePath }parreserve/toPadReserveNew.shtml?parType=0&pkParresId="
										+ pkParresIdOld + "&pkOrderId=";
							} else {
								if (typeLength == 3) {
									$("#fujiaTable").remove();
									$("#foot1").remove();
									document
											.getElementById("addfujiaTableDiv").style.display = 'block';
									document.getElementById("addfoot1").style.display = 'block';
									$("#addbasicPkg2").val(data);
									initTab("addformFujia4",
											"addfujiaTable", "addfoot1",
											addTrFujia);
								} else {
									$("#trimmingtable").remove();
									$("#foot2").remove();
									document
											.getElementById("addtrimmingtableDiv").style.display = 'block';
									document.getElementById("addfoot2").style.display = 'block';
									$("#addbasicPkg3").val(data);
									initTabTrim("addformZhuangshi4",
											"addtrimmingtable", "addfoot2",
											addTrming);
								}
							}
						}
					}
				});
		}
	function qtyUpdate(kind, ind, type) {
		if (!validaTuanForm('')) {
		} else {
		var inputId;
		var typeLength =0;
		if (type == 'fujia') {
			typeLength = 3;
			inputId = "qty" + ind;
		} else {
			inputId = "zhuangshiTr" + ind;
		}
		var f = document.getElementById(inputId);
		var c = f.value;
		if (kind == 1) {
			c++;
		} else if (kind == 2) {
			if (c >= 1)
				c--;
		}
		f.value = c;
		var resulthArray = [];
	    resulthArray =addInputFujiaArray(c,ind,type);
			 if (typeLength == 3) {
					$("#basicPkg2").val(resulthArray);
					$("#paramtype").val('fujia');
					var baspk3Value = getAddPrds("qiqiuTriBox", "");//  装饰  值
					$("#basicPkg3").val(baspk3Value);
				} else {
					$("#basicPkg3").val(resulthArray);
					$("#paramtype").val('zhuangshi');
					var basp2Value = getAddPrds("fujiacBox", "");//  附加菜单  值
					$("#basicPkg2").val(basp2Value);
				}
		saveInputNum(typeLength);
		}
	}

	function addInputFujiaArray(value, ind, type) {//附加菜单列表，装饰列表 页面输入 购买数量 ，添加 到 全局数组
		var delPrd = null;
		var resultyArray = [];
		if (type == 'fujia') {
			if (fujiaPrdArray.length == 0) {
				fujiaPrdArray.push(ind + "#" + value);
			} else {

				for (var k = 0; k < fujiaPrdArray.length; k++) {
					if (fujiaPrdArray[k].indexOf(ind) != -1) {
						delPrd = fujiaPrdArray[k];
						break;
					}
				}
				fujiaPrdArray.remove(delPrd);//删除旧的 值
				fujiaPrdArray.push(ind + "#" + value);
			}
			resultyArray = fujiaPrdArray;
		} else {
			if (trimPrdArray.length == 0) {
				trimPrdArray.push(ind + "#" + value);
			} else {

				for (var m = 0; m < trimPrdArray.length; m++) {
					if (trimPrdArray[m].indexOf(ind) != -1) {
						delPrd = trimPrdArray[m];
						break;
					}
				}
				trimPrdArray.remove(delPrd);//删除旧的 值
				trimPrdArray.push(ind + "#" + value);
			}
			resultyArray = trimPrdArray;
		}
		return resultyArray;
	}
 

	function loadParStatus() {
		var parstatus = '${parreserveOld.resStatus}';
		if (parstatus != "") {
			var parStatusName = parStatus[parstatus - 1];
			document.getElementById("parstatus").innerHTML = '<label>状态：</label>'
					+ parStatusName;
		} else {
			document.getElementById("parstatus").innerHTML = '<label>状态：</label>'
					+ parStatus[0];
		}
	}

	 
	 
	function getNowWeekDayToPrdId(resDate){
		var weekDay= "天一二三四五六".charAt(new Date(resDate).getDay());
		if(weekDay=='天'|| weekDay=='六'){
			return "ZBSP1408070530";//派对单人周末（含餐）
		}else{
			return "ZBSP1408070531";//派对单人非周末（含餐）
		}
	}
	
	function initTrFujia() {
		$.ajax({
			url:"${basePath }parreserve/paginateFujia.shtml",
		    type: 'POST',
		   data:$("#formFujia4").serialize(),//序列化表单里所有的内容	
		   async:false,
			success:function(data){
				if(data.results!=null){
					$.each(data.results,function(ind,obj){
						var htm="<tr>";
						htm+="<td>"+obj.prdName+"</td>";
						htm+=" <td>"+obj.productPrice+"</td>";
						var quantCount =obj.quantity;
						if(quantCount==null){
							quantCount=0;
						}
						var qty1="qtyUpdate(1,'"+obj.pkPrdId+"','fujia')";//增加按钮操作
						var qty2="qtyUpdate(2,'"+obj.pkPrdId+"','fujia')";//减少按钮操作
						var yanzhengNum ="yazhengNum(this,3)";
						var delButton ="del(this,11)";
						var disableIsShow ='${disableIsShow}';
						var delButtClass = "btn_l";
						if(disableIsShow=='disabled'){
							qty1="";qty2="";yanzhengNum="";delButton="";
							delButtClass ="btn_l_no";
							
						}
						
				htm += '<td><a href="javascript:'+qty2+'" class="jia_icon"></a><input value="'
													+ quantCount
													+ '" type="text" name="qty" id="qty'
													+ obj.pkPrdId
													+ '" onkeyup="'+yanzhengNum+'" class="iput_t w50" '+disableIsShow+'  ><a href="javascript:'+qty1+'" class="jian_icon"></a></td>';
											htm += '<td><input type="button" id="bu'
													+ obj.pkPrdId
													+ '" value="删除" onclick="'+delButton+'" class="'+delButtClass+'"></td></tr>';
											htm += "</tr>";
											fujiaPrdArray.push(obj.pkPrdId + "#" + 0);
											$("#fujiaTable").find("tr:eq(" + ind + ")")
													.after(htm);
										});
					}
			}
		});
	}

	function addTrFujia() { //add后的  附加菜单 列表
		$.ajax({
			url:"${basePath }parreserve/addPageFujia.shtml?addType=fujia",
		    type: 'POST',
		   data:$("#addformFujia4").serialize(),//序列化表单里所有的内容	
		   async:false,
			success:function(data){
				$("#addfujiaTable").find("tr:not(:first)").remove();
				if (data.results != null) {
					$.each(
							data.results,
									function(ind, obj) {
										var htm = "<tr>";
										htm += "<td>" + obj.prdName + "</td>";
										htm += " <td>" + obj.productPrice + "</td>";
										var quantCount = obj.quantity;
										if (quantCount == null) {
											quantCount = 0;
										}
										var qty1 = "qtyUpdate(1,'" + obj.pkPrdId+ "','fujia')";//增加按钮操作
										var qty2 = "qtyUpdate(2,'" + obj.pkPrdId+ "','fujia')";//减少按钮操作
										var yanzhengNum ="yazhengNum(this,3)";
										var delButton ="del(this,12)";
										var disableIsShow ='${disableIsShow}';
										var delButtClass = "btn_l";
										if(disableIsShow=='disabled'){
											qty1="";qty2="";yanzhengNum="";delButton="";
											delButtClass ="btn_l_no";
											
										}
										htm += '<td><a href="javascript:'+qty2+'" class="jia_icon"></a><input value="'
												+ quantCount
												+ '" type="text" name="qty" id="qty'
												+ obj.pkPrdId
												+ '" onkeyup="'+yanzhengNum+'" '+disableIsShow+' class="iput_t w50"   ><a href="javascript:'+qty1+'" class="jian_icon"></a></td>';
										htm += '<td><input type="button" id="bu'
												+ obj.pkPrdId
												+ '" value="删除" onclick="'+delButton+'" class="'+delButtClass+'"></td></tr>';
										htm += "</tr>";

										$("#addfujiaTable").find("tr:eq(" + ind + ")")
												.after(htm);
									});
				}
			}
		});
	}
	function initTrming() {//初始化 装饰 分页列表
		$.ajax({
			url:"${basePath }parreserve/paginateZhuangshi.shtml",
			 data:$("#formZhuangshi4").serialize(),//序列化表单里所有的内容	
			type:"post",
			async:false,
			success:function(data){
				if (data.results != null) {
					$.each(
									data.results,
									function(ind, obj) {
										var htm = "<tr>";
										htm += "<td>" + obj.prdName + "</td>";
										htm += " <td>" + obj.productPrice + "</td>";
										var quantCount = obj.quantity;
										if (quantCount == null) {
											quantCount = 0;
										}
										var qty1 = "qtyUpdate(1,'" + obj.pkPrdId+ "','zhuangshiTr')";//增加按钮操作
										var qty2 = "qtyUpdate(2,'" + obj.pkPrdId+ "','zhuangshiTr')";//减少按钮操作
										var yanzhengNum ="yazhengNum(this,11)";
										var delButton ="del(this,21)";
										var disableIsShow ='${disableIsShow}';
										var delButtClass = "btn_l";
										if(disableIsShow=='disabled'){
											qty1="";qty2="";yanzhengNum="";delButton="";
											delButtClass ="btn_l_no";
											
										}
										htm += '<td><a href="javascript:'+qty2+'" class="jia_icon"></a><input value="'
												+ quantCount
												+ '" type="text" name="zhuangshiTr" id="zhuangshiTr'
												+ obj.pkPrdId
												+ '" onkeyup="'+yanzhengNum+'" '+disableIsShow+' class="iput_t w50"   ><a href="javascript:'+qty1+'" class="jian_icon"></a></td>';
										htm += '<td><input type="button" id="zbu'
												+ obj.pkPrdId
												+ '" value="删除" onclick="'+delButton+'" class="'+delButtClass+'"></td></tr>';
										htm += "</tr>";
										trimPrdArray.push(obj.pkPrdId + "#" + 0);
										$("#trimmingtable").find("tr:eq(" + ind + ")")
												.after(htm);
									});
				}
			}
		});
	}
	function addTrming() {//add后的 装饰 分页列表
		$.ajax({
			url:"${basePath }parreserve/addPageZhuangshi.shtml?addType=zhuangs",
			 data:$("#addformZhuangshi4").serialize(),//序列化表单里所有的内容	
			type:"post",
			async:false,
			success:function(data){
				$("#addtrimmingtable").find("tr:not(:first)").remove();
				if (data.results != null) {
					$.each(
							data.results,
									function(ind, obj) {
										var htm = "<tr>";
										htm += "<td>" + obj.prdName + "</td>";
										htm += " <td>" + obj.productPrice + "</td>";
										var quantCount = obj.quantity;
										if (quantCount == null) {
											quantCount = 0;
										}
										var qty1 = "qtyUpdate(1,'" + obj.pkPrdId+ "','zhuangshiTr')";//增加按钮操作
										var qty2 = "qtyUpdate(2,'" + obj.pkPrdId+ "','zhuangshiTr')";//减少按钮操作
										var yanzhengNum ="yazhengNum(this,11)";
										var delButton ="del(this,22)";
										var disableIsShow ='${disableIsShow}';
										var delButtClass = "btn_l";
										if(disableIsShow=='disabled'){
											qty1="";qty2="";yanzhengNum="";delButton="";
											delButtClass ="btn_l_no";
											
										}
										htm += '<td><a href="javascript:'+qty2+'" class="jia_icon"></a><input value="'
												+ quantCount
												+ '" type="text" name="zhuangshiTr" id="zhuangshiTr'
												+ obj.pkPrdId
												+ '" onkeyup="'+yanzhengNum+'" '+disableIsShow+' class="iput_t w50"   ><a href="javascript:'+qty1+'" class="jian_icon"></a></td>';
										htm += '<td><input type="button" id="zbu'
												+ obj.pkPrdId
												+ '" value="删除" onclick="'+delButton+'" class="'+delButtClass+'"></td></tr>';
										htm += "</tr>";

										$("#addtrimmingtable").find(
												"tr:eq(" + ind + ")").after(htm);
									});
				}
			}
		});
	} 
	
	function yazhengNum(o, typeLength) {
		if (!validaTuanForm('')) {
		} else {
		if (!isNaN(o.value)) {
			var inputId = o.id;
			var prdId;
			prdId = inputId.substring(typeLength, inputId.length);
			var datas = "";
			var resulthArray = [];
			if (typeLength == 3) {
				resulthArray = addInputFujiaArray(o.value, prdId, "fujia");
				$("#basicPkg2").val(resulthArray);
				$("#paramtype").val('fujia');
				var baspk3Value = getAddPrds("qiqiuTriBox", "");//  装饰  值
				$("#basicPkg3").val(baspk3Value);
			} else {
				resulthArray = addInputFujiaArray(o.value, prdId, "zhuangshi");
				$("#basicPkg3").val(resulthArray);
				$("#paramtype").val('zhuangshi');
				var basp2Value = getAddPrds("fujiacBox", "");//  附加菜单  值
				$("#basicPkg2").val(basp2Value);
			}
			saveInputNum(typeLength);
		} else {
			$.messager.alert('提示', '请输入大于0的数字！', 'warning');
			o.value = '0';
		}
		}
	}
	function openCengValid(cengType) {
		if (validaTuanForm()) {
			var pkRoomIdtr = checkRoomId();
			if (pkRoomIdtr == "") {
				$.messager.alert('提示', '请选择房间！', 'warning');
				$("#paidukaishi").val("");
				refreshSelect();
				return false;
			}
			$("#roomIds").val(pkRoomIdtr);
			//=======ajax 根据房间编号，时间，查找是否 房间已经占用

			var resDay = $("#presDay").val();
			if (resDay == "") {
				$.messager.alert('提示', '请选择日期！', 'warning');
				$("#paidukaishi").val("");
				refreshSelect();
				return false;
			}
			var paidukaishi = $("#paidukaishi").val();
			if (paidukaishi == "") {
				$.messager.alert('提示', '请选择时间！', 'warning');
				$("#paidukaishi").val("");
				refreshSelect();
				return false;
			} else {
				var timeArray = paidukaishi.split("-");
				$("#resTimeS").val(timeArray[0]);
				$("#resTimeE").val(timeArray[1]);
			}
			var pkParresId = $("#pkParresId").val();
			var url = '${basePath }parreserve/findAlreadyRoomList.shtml';
			$
					.ajax({
						url : url,
						type : 'POST',
						data : "roomId=" + pkRoomIdtr + "&presDay=" + resDay
								+ "&resTimeS=" + timeArray[0] + "&resTimeE="
								+ timeArray[1] + "&pkParresId=" + pkParresId,
						async : false,
						error : function(XMLHttpRequest) {
							ajaxError(XMLHttpRequest);
						},
						success : function(data) {
							if (data != null) {
								var parReserveList;
								for ( var o in data) {
									if (o == "parReserveList") {
										jsonarray = data[o];
										if (jsonarray != null
												&& jsonarray.length > 0) {
											var resTimestext;
											var resTimeEtext;
											var roomName = "(";
											for (var k = 0; k < jsonarray.length; k++) {
												var jsonobj = jsonarray[k];
												if (jsonobj != null) {
													resTimestext = jsonobj["resTimeS"];
													resTimeEtext = jsonobj["resTimeE"];
													roomName += jsonobj["roomName"]
															+ " ";
												}
											}
											roomName += ")";
											var msg = resDay + " "
													+ resTimestext + "-"
													+ resTimeEtext + " 时间段的房间"
													+ roomName
													+ " 已经被预约，请重新选择时间段或 房间！";
											$.messager.alert('提示', msg,
													'warning');
											$("#paidukaishi").val("");
											refreshSelect();

											return false;
										} else {
											$(cengType).window('open');
										}
									}
								}
							} else {
								return false;
								$.messager.alert('提示', '系统错误！', 'error');
							}
						}
					});
			//========

		}
	}

	function loadParTaocan() {
		var arr = [];
		var divIdP = "openCengValid('#q')";
		var divopen = '"open"';
		var taocanSize = '${gblScmTaocanSize}';
		arr.push('<table class="table">');
		<c:forEach items="${listGblScmTaocan}" var="parTaocan" varStatus="status">
		<c:choose>
		<c:when test="${status.index==0}">
			arr.push('<tr><td>主食1</td><td>${parTaocan.cateName}：${parTaocan.prdName} </td></tr>');
			</c:when>
		<c:when test="${status.index==1 }">
			arr.push('<tr><td>主食2</td><td>${parTaocan.cateName}：${parTaocan.prdName} </td></tr>');
		</c:when>
		<c:when test="${status.index==2 && parTaocan.fkPrdcateId=='001007001002'}">
			arr.push('<tr><td>主食3</td><td>${parTaocan.cateName}：${parTaocan.prdName} </td></tr>');
		</c:when>
		<c:otherwise>
		arr
				.push('<tr><td>${parTaocan.cateName}</td><td>${parTaocan.prdName} </td></tr>');
		</c:otherwise>
		</c:choose>
		</c:forEach>
		arr.push('</table>');
		var parTaocanDiv = document.getElementById("parTaocan");
		parTaocanDiv.innerHTML = arr.join('');
	}
	function loadQCengTaocan() {
		var arr = [];
		arr.push('<ul id="tab_conbox_a" class="fixed p10">');
		arr.push('<li>');
		arr.push('<dl class="order_add_peic fl">');
		arr.push('<div id="hoverre" class="peic_hover"><dt ><a href="javascript:updateTaocanzhushi(1)">热食</a></dt></div>');
		arr.push('<div id="hoverleng" > <dt><a href="javascript:updateTaocanzhushi(2)">冷食</a></dt></div>');
		arr.push(' </dl>');
		arr.push('<dl class="fl order_add_peib">');
		arr.push('<div id="updatezhushiRe">');
		var taocanonChange = "";
		<c:forEach items="${listGblZhuRe}" var="zhure" varStatus="status" >
		taocanonChange = "taoOnChange('${zhure.pkPrdId}_alreadyZhu@${zhure.prdName}')";
		arr
				.push('<dd><input type="checkbox" id="${zhure.pkPrdId}"  onclick="'+taocanonChange+'"  name="zhubox" value="${zhure.pkPrdId}">${zhure.prdName} </dd> ');
		</c:forEach>
		arr.push('</div>');
		arr.push('<div id="updatezhushiLeng" style="display:none">');
		<c:forEach items="${listGblZhuLeng}" var="zhuLeng" varStatus="status" >
		taocanonChange = "taoOnChange('${zhuLeng.pkPrdId}_alreadyZhu@${zhuLeng.prdName}')";
		arr
				.push('<dd><input type="checkbox" id="${zhuLeng.pkPrdId}" onclick="'+taocanonChange+'"  name="zhubox" value="${zhuLeng.pkPrdId}">${zhuLeng.prdName} </dd>');
		</c:forEach>
		arr.push('</div></dl></li>');
		arr
				.push('<div  style="display:none"><li><dl class="fl order_add_peib">');
		<c:forEach items="${listGblpeicai}" var="peicai" varStatus="status">
		taocanonChange = "taoOnChange('${peicai.pkPrdId}_alreadyPeiCai@${peicai.prdName}')";
		arr
				.push('<dd><input type="radio" id="${peicai.pkPrdId}" onclick="'+taocanonChange+'" name="peicaiRadio" value="${peicai.pkPrdId}">${peicai.prdName}</dd>');
		</c:forEach>
		arr.push('</dl></li></div>');
		arr
				.push('<div  style="display:none"><li><dl class="fl order_add_peib">');
		<c:forEach items="${listGblparYinliao}" var="yinliao" varStatus="status">
		taocanonChange = "taoOnChange('${yinliao.pkPrdId}_alreadyYinl@${yinliao.prdName}')";
		arr
				.push('<dd><input type="radio" id="${yinliao.pkPrdId}" onclick="'+taocanonChange+'" name="yinliaoRadio" value="${yinliao.pkPrdId}">${yinliao.prdName}</dd>');
		</c:forEach>
		arr.push('</dl></li></div></ul>');
		var cengzhushiDiv = document.getElementById("cengzhushi");
		cengzhushiDiv.innerHTML = arr.join('');
	}
	var hiddenselct = "";
	function alreadyYinl() {//加载 默认 已选套餐的饮料
		//<div id="alreadyYinl">
		var arr = [];
		<c:forEach items="${listGblScmTaocan}" var="parTaocan" varStatus="status">
		var delAlreadonclick = "delAlreadyTaocan('${parTaocan.pkPrdId}')";
		<c:choose>
		<c:when test="${parTaocan.fkPrdcateId=='001007003' }">
		arr
				.push('<dd id="pAlready${parTaocan.pkPrdId}">${parTaocan.prdName}<a onclick='+delAlreadonclick+' class=" delete_icon fr"></a></dd>');
		document.getElementById('${parTaocan.pkPrdId}').checked = true;
		</c:when>
		<c:otherwise>
		</c:otherwise>
		</c:choose>
		</c:forEach>
		var alreadyYinlDiv = document.getElementById("alreadyYinl");
		alreadyYinlDiv.innerHTML = arr.join('');
	}

	function delAlreadyTaocan(divId) {
		document.getElementById(divId).checked = false;
		var alreadydivid = "#pAlready" + divId;
		$(alreadydivid).remove();
	}
	function alreadyPeiCai() {//加载 默认 已选套餐的配菜
		//<div id="alreadyPeiCai">
		var arr = [];
		<c:forEach items="${listGblScmTaocan}" var="parTaocan" varStatus="status">
		var delAlreadonclick = "delAlreadyTaocan('${parTaocan.pkPrdId}')";
		<c:choose>
		<c:when test="${parTaocan.fkPrdcateId=='001007002' }">
		arr
				.push('<dd id="pAlready${parTaocan.pkPrdId}">${parTaocan.prdName}  <a onclick='+delAlreadonclick+' class=" delete_icon fr"></a></dd>');
		document.getElementById('${parTaocan.pkPrdId}').checked = true;
		</c:when>
		<c:otherwise>
		</c:otherwise>
		</c:choose>
		</c:forEach>
		var alreadyPeiCaiDiv = document.getElementById("alreadyPeiCai");
		alreadyPeiCaiDiv.innerHTML = arr.join('');
	}

	function alreadyZhu() {//加载 默认 已选套餐的主食
		//<div id="alreadyZhu">
		var arr = [];
		<c:forEach items="${listGblScmTaocan}" var="parTaocan" varStatus="status">
		var delAlreadonclick = "delAlreadyTaocan('${parTaocan.pkPrdId}')";
		<c:choose>
		<c:when test="${parTaocan.fkPrdcateId=='001007001001'   }">
		arr
				.push(' <dd  id="pAlready${parTaocan.pkPrdId}">${parTaocan.prdName} <a onclick='+delAlreadonclick+' class=" delete_icon fr"></a></dd> ');
		document.getElementById('${parTaocan.pkPrdId}').checked = true;
		</c:when>
		<c:when test="${  parTaocan.fkPrdcateId=='001007001002' }">
		arr
				.push(' <dd  id="pAlready${parTaocan.pkPrdId}">${parTaocan.prdName} <a onclick='+delAlreadonclick+' class=" delete_icon fr"></a></dd> ');
		document.getElementById('${parTaocan.pkPrdId}').checked = true;
		</c:when>
		<c:otherwise>
		</c:otherwise>
		</c:choose>
		</c:forEach>
		var alreadyZhuDiv = document.getElementById("alreadyZhu");
		alreadyZhuDiv.innerHTML = arr.join('');
	}

	function loadParFujia() {
		var arr = [];
		var divIdP = "$('#q').window('open')";
		var divopen = '"open"';
		var taocanSize = '${gblScmTaocanSize}';
		//arr.push('<table class="table"><tr><th>商品</th><th>价格(元)</th><th>数量</th><th>操作</th></tr>');
		<c:forEach items="${listGblScmFujia}" var="parFujia" varStatus="status">
		arr
				.push('<tr><td>${parFujia.prdName}</td><td>200</td><td><a href="#" class="jia_icon"></a><input type="text" class="iput_t w50" value="0">');
		arr
				.push('<a href="#" class="jian_icon"></a></td><td><a href="#">删除</a></td></tr>');
		</c:forEach>
		//arr.push('</table>');
		var parFujiaDiv = document.getElementById("parFujia");
		parFujiaDiv.innerHTML = arr.join('');
	}

	function taoOnChange(divIds) {
		var checkDivId = divIds.substring(0, divIds.indexOf('_'));
		var str = document.getElementsByName("zhubox");
		var chestr = "";
		var indexZhushi = 0;
		for (var i = 0; i < str.length; i++) {
			if (str[i].checked) {
				chestr += str[i].value + ",";
				indexZhushi++;
			}
		}
		if (indexZhushi > 3) {
			document.getElementById(checkDivId).checked = false;
			$.messager.alert('提示', '派对预约最多只能选择3个主食！', 'warning');
			return;// 以上为验证 所选 的 主食套餐 是否大于2
		} else {

			var divId = divIds.substring(0, divIds.indexOf('@'));
			var prdName = divIds.substring(divIds.indexOf('@') + 1,
					divIds.length);
			var zhuDiv = divId.substring(divId.indexOf("_") + 1, divId.length);
			var alreadyZhuDiv = document.getElementById(zhuDiv);
			if (document.getElementById(checkDivId).checked) {
				var delAlreadyoncli = "delAlreadyTaocan('" + checkDivId + "')";
				if (zhuDiv == "alreadyPeiCai" || zhuDiv == "alreadyYinl") {
					alreadyZhuDiv.innerHTML = '<dd id="pAlready'+checkDivId+'">'
							+ prdName
							+ '<a onclick='+delAlreadyoncli+' class=" delete_icon fr"></a></dd>';//配菜，饮料 都是 最能选择1.所以 是innerHTML
				} else {
					$(alreadyZhuDiv)
							.append(
									'<dd id="pAlready'+checkDivId+'">'
											+ prdName
											+ '<a onclick='+delAlreadyoncli+' class=" delete_icon fr"></a></dd>');
				}

			} else {
				var pAlreadydivid = "#pAlready" + checkDivId;
				$(pAlreadydivid).remove();

			}
		}

	}
	function validaUTaocan() {
		var str = document.getElementsByName("zhubox");
		var chestr = "";
		var indexZhushi = 0;
		for (var i = 0; i < str.length; i++) {
			if (str[i].checked) {
				chestr += str[i].value + ",";
				indexZhushi++;
			}
		}
		var trueFlag = true;
		if (chestr == "") {
			//$.messager.alert('提示','派对预约请先选择3个主食！','warning');
			//trueFlag=false;
		}

		if (chestr != "" && indexZhushi < 3) {
			var chaIndex = 3 - indexZhushi;
			if (chaIndex > 0) {
				// $.messager.alert('提示','请先选择3个主食！还差'+chaIndex+'个主食可以选择哦','warning');
				// trueFlag=false;
			}
		} else if (indexZhushi > 3) {
			$.messager.alert('提示', '派对预约最多只能选择3个主食！', 'warning');
			trueFlag = false;
		}
		// 以下是配菜 的验证
		var strpeicaiRadio = document.getElementsByName("peicaiRadio");
		var peicaistr = "";
		for (i = 0; i < strpeicaiRadio.length; i++) {
			if (strpeicaiRadio[i].checked) {
				peicaistr += strpeicaiRadio[i].value;
				break;
			}
		}
		if (peicaistr == "") {
			//$.messager.alert('提示','请先选择1个配菜！','warning');
			//trueFlag=false;
		}
		// 以下是饮料 的验证
		var stryinliaoRadio = document.getElementsByName("yinliaoRadio");
		var yinliaostr = "";
		for (i = 0; i < stryinliaoRadio.length; i++) {
			if (stryinliaoRadio[i].checked) {
				yinliaostr += stryinliaoRadio[i].value;
				break;
			}
		}
		if (yinliaostr == "") {
			//$.messager.alert('提示','请先选择1个饮料！','warning');
			// trueFlag=false;
		}
		return chestr + peicaistr + "," + yinliaostr;
	}
	function getAddPrds(typeName1, saveType) {
		var str = document.getElementsByName(typeName1);
		var chestr = "";
		var indexZhushi = 0;
		for (var i = 0; i < str.length; i++) {
			if (str[i].checked) {
				var delPrd = '';
				var sPrdId = '';
				var pushFlag = true;
				var checkValue = str[i].value;
				//==
				if (typeName1 == "fujiacBox") {
					for (var k = 0; k < fujiaPrdArray.length; k++) {
						var delfujiaArray = fujiaPrdArray[k].split("#");
						sPrdId = delfujiaArray[0];
						if (checkValue == sPrdId && delfujiaArray[1] == 0) {
							delPrd += fujiaPrdArray[k] + ",";
						} else if (checkValue == sPrdId && delfujiaArray[1] > 0) {
							pushFlag = false;// 当以前已经 选择 这个商品，则 不push 到数组中
						}
					}
					var delPrds = delPrd.split(",");
					for ( var x in delPrds) {
						fujiaPrdArray.remove(delPrds[x]);//删除旧的 值
					} ///以上 循环 先删除 重复值，再新增
					//===
					if (pushFlag) {
						fujiaPrdArray.push(checkValue + "#0");
					}
				} else {
					for (var m = 0; m < trimPrdArray.length; m++) {
						var delTrimArray = trimPrdArray[m].split("#");

						var sPrdId = delTrimArray[0];
						if (checkValue == sPrdId && delTrimArray[1] == 0) {//delTrimArray[1]==0 这个判断条件 ，避免 删除 购买过的数量数量商品
							delPrd += trimPrdArray[m] + ",";
						} else if (checkValue == sPrdId && delTrimArray[1] > 0) {
							pushFlag = false;// 当以前已经 选择 这个商品，则 不push 到数组中
						}
					}
					var delPrds = delPrd.split(",");
					for ( var xx in delPrds) {
						trimPrdArray.remove(delPrds[xx]);//删除旧的 值
					}
					if (pushFlag) {
						trimPrdArray.push(checkValue + "#0");
					}
				}
				indexZhushi++;
			}
		}
		var inputNumArray = [];
		if (typeName1 == "fujiacBox") {
			inputNumArray = fujiaPrdArray;//附加列表页面 输入 的 菜单 购买数量 数组
		} else {
			inputNumArray = trimPrdArray;//装饰物列表页面 输入 的 菜单 购买数量数组
		}
		if (inputNumArray != null && inputNumArray != '') {
			for (var k = 0; k < inputNumArray.length; k++) {
				var inputNumId = inputNumArray[k];
				var numIds = inputNumId.split("#");
				if (saveType == "nextSave") {//最终保存 到下一步 时，验证 是否有 购买数量 为0 的 商品编号。
					if (numIds[1] == "" || numIds[1] == "0" || numIds[1] == 0) {
						continue;
					} else {
						if (k == inputNumArray.length - 1) {
							chestr += inputNumId;
						} else {
							chestr += inputNumId + ",";
						}

					}
				} else {
					if (k == inputNumArray.length - 1) {
						chestr += inputNumId;
					} else {
						chestr += inputNumId + ",";
					}
				}

			}
		}
		return chestr;
	}

	function fujiaDiv(divId) {//增加 附加 菜单 
		if (!validaTuanForm()) {
		} else {
			var pkRoomIdtr = checkRoomId();
			if (pkRoomIdtr == "") {
				$.messager.alert('提示', '请选择房间！', 'warning');
				$("#paidukaishi").val("");
				refreshSelect();
				return;
			}
			$("#roomIds").val(pkRoomIdtr);
			//=======ajax 根据房间编号，时间，查找是否 房间已经占用

			var resDay = $("#presDay").val();
			if (resDay == "") {
				$.messager.alert('提示', '请选择日期！', 'warning');
				$("#paidukaishi").val("");
				refreshSelect();
				return;
			}
			var paidukaishi = $("#paidukaishi").val();
			if (paidukaishi == "") {
				$.messager.alert('提示', '请选择时间！', 'warning');
				$("#paidukaishi").val("");
				refreshSelect();
				return;
			} else {
				var timeArray = paidukaishi.split("-");
				$("#resTimeS").val(timeArray[0]);
				$("#resTimeE").val(timeArray[1]);
			}
			var pkParresId = $("#pkParresId").val();
			var url = '${basePath }parreserve/findAlreadyRoomList.shtml';
			$
					.ajax({
						url : url,
						type : 'POST',
						data : "roomId=" + pkRoomIdtr + "&presDay=" + resDay
								+ "&resTimeS=" + timeArray[0] + "&resTimeE="
								+ timeArray[1] + "&pkParresId=" + pkParresId,
						async : false,
						error : function(XMLHttpRequest) {
							ajaxError(XMLHttpRequest);
						},
						success : function(data) {
							if (data != null) {
								var parReserveList;
								for ( var o in data) {
									if (o == "parReserveList") {
										jsonarray = data[o];
										if (jsonarray != null
												&& jsonarray.length > 0) {
											var resTimestext;
											var resTimeEtext;
											var roomName = "(";
											for (var k = 0; k < jsonarray.length; k++) {
												var jsonobj = jsonarray[k];
												if (jsonobj != null) {
													resTimestext = jsonobj["resTimeS"];
													resTimeEtext = jsonobj["resTimeE"];
													roomName += jsonobj["roomName"]
															+ " ";
												}
											}
											roomName += ")";
											var msg = resDay + " "
													+ resTimestext + "-"
													+ resTimeEtext + " 时间段的房间"
													+ roomName
													+ " 已经被预约，请重新选择时间段或 房间！";
											$.messager.alert('提示', msg,
													'warning');
											$("#paidukaishi").val("");
											refreshSelect();

											return;
										} else {
											var valdateTaocan = validaUTaocan();
											var taocanPid =getNowWeekDayToPrdId(resDay);
											$("#basicPkg").val(taocanPid+"#"+ valdateTaocan);
											var basp2Value = getAddPrds(
													"fujiacBox", "");//  附加菜单  值
											$("#basicPkg2").val(basp2Value);
											var baspk3Value = getAddPrds(
													"qiqiuTriBox", "");//  装饰  值
											$("#basicPkg3").val(baspk3Value);
											var moTimsValue = $("#modiTimedis")
													.val();
											$("#pmodiTime").val(moTimsValue);
											var moByidValue = $("#modibydis")
													.val();
											$("#modiby").val(moByidValue);

											var url = '${basePath }parreserve/addParReserveFujia.shtml?addType='
													+ divId;
											$
													.ajax({
														url : url,
														type : 'POST',
														data : $("#form1")
																.serialize(),//序列化表单里所有的内容
														async : false,
														error : function(
																XMLHttpRequest) {
															ajaxError(XMLHttpRequest);
														},
														success : function(data) {
															if (data != null) {
																for ( var o in data) {
																	if (o == "pkParresId") {
																		$(
																				"#pkParresId")
																				.val(
																						data[o]);
																	} else if (o == "basicPkg2") {
																		$(
																				"#addbasicPkg2")
																				.val(
																						data[o]);
																	} else if (o == "basicPkg3") {
																		$(
																				"#addbasicPkg3")
																				.val(
																						data[o]);
																	}
																}
																if (divId == "fujia") {
																	$(
																			"#fujiaTable")
																			.remove();
																	document
																			.getElementById("addfujiaTableDiv").style.display = 'block';
																	addTrFujia();
																} else {
																	$(
																			"#trimmingtable")
																			.remove();
																	document
																			.getElementById("addtrimmingtableDiv").style.display = 'block';
																	addTrming();
																}
																$('#' + divId)
																		.window(
																				'close');
															} else {
																$.messager
																		.alert(
																				'提示',
																				'增加失败！',
																				'error');
															}
														}
													});
										}
									}
								}
							} else {
								$.messager.alert('提示', '保存失败！', 'error');
							}
						}
					});
			//========
		}
	}
	function updateTaocanzhushi(dispalyDivid) {
		if (dispalyDivid == 1) {
			dispalyDivid = "hoverre";
		} else {
			dispalyDivid = "hoverleng";
		}
		var addHoverArray = new Array("hoverre", "hoverleng"); //附加主食分类 divid 的数组
		var jiaPrdNameListDivArray = new Array("updatezhushiRe",
				"updatezhushiLeng"); //附加主食列表 divid 的数组
		var dispalyZhuDiv = document.getElementById(dispalyDivid);
		var hiddenZhuDiv = null;
		for (var i = 0; i < addHoverArray.length; i++) {
			if (dispalyDivid == addHoverArray[i]) {
				dispalyZhuDiv.className = 'peic_hover';
				document.getElementById(jiaPrdNameListDivArray[i]).style.display = 'block';
			} else {
				hiddenZhuDiv = document.getElementById(addHoverArray[i]);
				hiddenZhuDiv.className = '';
				document.getElementById(jiaPrdNameListDivArray[i]).style.display = 'none';
			}
		}
	}

	function addFujiaCate(dispalyDivid) {//弹出层  附加菜单  分类 动态 div展示
		var addHoverArray = new Array("addhoverre", "addhoverleng",
				"addPeicai", "addTdian", "addyliao", "addwine"); //附加菜单食物分类 divid 的数组
		var jiaPrdNameListDivArray = new Array("addjiaRe", "addjiaLeng",
				"addJiapeicai", "addjiaTdian", "addjiaYliao", "addjiaWine"); //附加菜单食物列表 divid 的数组
		var dispalyZhuDiv = document.getElementById(dispalyDivid);
		var hiddenZhuDiv = null;
		for (var i = 0; i < addHoverArray.length; i++) {
			if (dispalyDivid == addHoverArray[i]) {
				dispalyZhuDiv.className = 'peic_hover';
				document.getElementById(jiaPrdNameListDivArray[i]).style.display = 'block';
			} else {
				hiddenZhuDiv = document.getElementById(addHoverArray[i]);
				hiddenZhuDiv.className = '';
				document.getElementById(jiaPrdNameListDivArray[i]).style.display = 'none';
			}
		}

	}

	function addTrimCate(dispalyDivid) {// 弹出层 装饰物  分类 动态 div展示
		var addHoverArray = new Array("addTrQiqiu", "addTrPDingzhi",
				"addTrCaidanl", "addTrbiaoyl"); // 装饰物  分类 divid 的数组
		var TrimNameListDivArray = new Array("addqiqiuTri", "addDingzhiTri",
				"addcaidanTri", "addbiaoyTri"); // 装饰物  列表 divid 的数组
		var dispalyZhuDiv = document.getElementById(dispalyDivid);
		var hiddenZhuDiv = null;
		for (var i = 0; i < addHoverArray.length; i++) {
			if (dispalyDivid == addHoverArray[i]) {
				dispalyZhuDiv.className = 'peic_hover';
				document.getElementById(TrimNameListDivArray[i]).style.display = 'block';
			} else {
				hiddenZhuDiv = document.getElementById(addHoverArray[i]);
				hiddenZhuDiv.className = '';
				document.getElementById(TrimNameListDivArray[i]).style.display = 'none';
			}
		}

	}
	function validaTuanForm() {
		var subject = $("#subject").val();
		var conName = $("#conName").val();
		var conTel =$("#conTel").val();
		var conMobile = $("#conMobile").val();
		var resDay = $("#presDay").val();
		var resMemCnt = $("#resMemCnt").val();
		var fkPartypeId = $("#fkPartypeId").val();
		var chdName = $("#chdName").val();
		if (fkPartypeId == "") {
			$.messager.alert('提示', '请选择活动类型！', 'warning');
			$("#fkPartypeId").val("");
			refreshSelect();
			return false;
		}
		if (subject == "") {
			$.messager.alert('提示', '请输入主题！', 'warning');
			return false;
		}
		if (subject.length > 40) {
			$.messager.alert('提示', '输入的主题过长，请保持在40字符以内！', 'warning');
			return false;
		}
		if(""!=chdName && chdName.length>30){
			  $.messager.alert('提示','输入的儿童姓名过长，请保持在30字符以内！','warning');
			  return false;
		  }
		if (conName == "") {
			$.messager.alert('提示', '请输入联系人！', 'warning');
			return false;
		}
		if (conName.length > 40) {
			$.messager.alert('提示', '输入的联系人过长，请保持在40字符以内！', 'warning');
			return false;
		}
		if(""!=conTel && conTel.length>15){
			  $.messager.alert('提示','输入的固话过长，请保持在15字符以内！','warning');
			  return false;
		  }
		if (conMobile == "") {
			$.messager.alert('提示', '请输入手机号码！', 'warning');
			return false;
		}
		if (conMobile.length > 15) {
			$.messager.alert('提示', '输入的手机号码过长，请保持在15字符以内！', 'warning');
			return false;
		}
		var pkRoomIdtr = checkRoomId();
		if (pkRoomIdtr == "") {
			$.messager.alert('提示', '请选择房间！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return false;
		}
		if (resDay == "") {
			$.messager.alert('提示', '请选择日期！', 'warning');
			return false;
		}

		var paidukaishi = $("#paidukaishi").val();
		if (paidukaishi == "") {
			$.messager.alert('提示', '请选择时间！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return false;
		}
		
	     var overtimev =$("#overTime").val();
	     var fkOtprdId =$("#fkOtprdId").val();
	     if(fkOtprdId !=""){
	    	 if(overtimev ==""){
	    		 $.messager.alert('提示', '请选择加时时长！', 'warning');
	    		 return false;
	    	 }
	     }
	     
	     if(overtimev!=""){
	    	 if(fkOtprdId==""){
	    		 $.messager.alert('提示', '请选择加时房间类型！', 'warning');
	    		 return false;
	    	 }
	     }
		if (resMemCnt == "") {
			$.messager.alert('提示', '请输入人数！', 'warning');
			return false;
		}
		return true;
	}
	function addRow() {

		//添加行
		var t = document.getElementById('fujiaTable');

		var newTr = t.insertRow();

		//添加列

		var newTd0 = newTr.insertCell();

		var newTd1 = newTr.insertCell();

		var newTd2 = newTr.insertCell();

		var newTd3 = newTr.insertCell();

		//设置列内容和属性 
		newTd0.innerHTML = document.all("a").options[document.all("a").selectedIndex].text;

		newTd1.innerHTML = '<input type="text" name="b">';

		newTd2.innerHTML = '<input type="text" name="c">';

		newTd3.innerHTML = '<input type="button" name="del" value="删除" onclick="del(this)">';

	}
	function del(o, typeDiv) {
		if (typeDiv == 11) {
			typeDiv = 'fujiaTable';
		} else if (typeDiv == 12) {
			typeDiv = 'addfujiaTable';
		} else if (typeDiv == 21) {
			typeDiv = 'trimmingtable';
		} else if (typeDiv == 22) {
			typeDiv = 'addtrimmingtable';
		}

		var t = document.getElementById(typeDiv);
		var tDId = o.id;
		var delPrd = null;
		var sPrdId = null;
		var checkId = "";
		if (typeDiv == 11 || typeDiv == 12) {
			divId = 'fujia';
		} else {
			divId = 'p';
		}
		if (!validaTuanForm(divId)) {
		} else {
			if (typeDiv == 'fujiaTable' || typeDiv == 'addfujiaTable') {
				for (var k = 0; k < fujiaPrdArray.length; k++) {
					sPrdId = fujiaPrdArray[k].substring(0, fujiaPrdArray[k]
							.indexOf("#"));
					checkId = "fujiacBox" + sPrdId;
					if (document.getElementById(checkId) != null) {
						document.getElementById(checkId).checked = false;
					}
					if (tDId.indexOf(sPrdId) != -1) {
						delPrd = fujiaPrdArray[k];
					}
				}
				fujiaPrdArray.remove(delPrd);//删除旧的 值
				t.deleteRow(o.parentNode.parentNode.rowIndex);
				fujiaDiv('fujia');
			} else if (typeDiv == 'trimmingtable'
					|| typeDiv == 'addtrimmingtable') {
				for (var m = 0; m < trimPrdArray.length; m++) {
					var sPrdId = trimPrdArray[m].substring(0, trimPrdArray[m]
							.indexOf("#"));
					checkId = "addqiqiu" + sPrdId;
					if (document.getElementById(checkId) != null) {
						document.getElementById(checkId).checked = false;
					}
					if (tDId.indexOf(sPrdId) != -1) {
						delPrd = trimPrdArray[m];
					}
				}
				trimPrdArray.remove(delPrd);//删除旧的 值

				t.deleteRow(o.parentNode.parentNode.rowIndex);
				fujiaDiv('p');
			}
		}

	}

	function closeDiv(divId, type) {
		if (type == 'save') {
			alert("保存成功！");
		}
		$('#' + divId).window('close');
	}
	function cancelPage(pageName, type) {
		if (type == 'save') {
			alert("保存成功！");
		}
		var guanlitype = '${guanliDetail}';
		if (guanlitype != "" && guanlitype == "guanliDetail") {
			var pkParresId = '${pkParresId}';
			var url = '${basePath }parreserve/parReserveManagesDetail.shtml?pkParresId='
					+ pkParresId + '&grpFlag=0';
			window.location.href = url;
		} else {
			window.location.href = pageName;
		}
	}

	function editTaocanControl(divId) {//派对修改 套餐
		if (!validaTuanForm()) {
			$('#' + divId).window('close');
		}
		var pkRoomIdtr = checkRoomId();
		if (pkRoomIdtr == "") {
			$.messager.alert('提示', '请选择房间！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return false;
		}
		$("#roomIds").val(pkRoomIdtr);
		//=======ajax 根据房间编号，时间，查找是否 房间已经占用

		var resDay = $("#presDay").val();
		if (resDay == "") {
			$.messager.alert('提示', '请选择日期！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return;
		}
		var paidukaishi = $("#paidukaishi").val();
		if (paidukaishi == "") {
			$.messager.alert('提示', '请选择时间！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return;
		} else {
			var timeArray = paidukaishi.split("-");
			$("#resTimeS").val(timeArray[0]);
			$("#resTimeE").val(timeArray[1]);
		}
		pkParresId = $("#pkParresId").val();
		var url = '${basePath }parreserve/findAlreadyRoomList.shtml';
		$
				.ajax({
					url : url,
					type : 'POST',
					data : "roomId=" + pkRoomIdtr + "&presDay=" + resDay
							+ "&resTimeS=" + timeArray[0] + "&resTimeE="
							+ timeArray[1] + "&pkParresId=" + pkParresId,
					async : false,
					error : function(XMLHttpRequest) {
						ajaxError(XMLHttpRequest);
					},
					success : function(data) {
						if (data != null) {
							var parReserveList;
							for ( var o in data) {
								if (o == "parReserveList") {
									jsonarray = data[o];
									if (jsonarray != null
											&& jsonarray.length > 0) {
										var resTimestext;
										var resTimeEtext;
										var roomName = "(";
										for (var k = 0; k < jsonarray.length; k++) {
											var jsonobj = jsonarray[k];
											if (jsonobj != null) {
												resTimestext = jsonobj["resTimeS"];
												resTimeEtext = jsonobj["resTimeE"];
												roomName += jsonobj["roomName"]
														+ " ";
											}
										}
										roomName += ")";
										var msg = resDay + " " + resTimestext
												+ "-" + resTimeEtext
												+ " 时间段的房间" + roomName
												+ " 已经被预约，请重新选择时间段或 房间！";
										$.messager.alert('提示', msg, 'warning');
										$("#paidukaishi").val("");
										refreshSelect();

										return;
									} else {
										var valdateTaocan = validaUTaocan();
										var taocanPid =getNowWeekDayToPrdId(resDay);
										$("#basicPkg").val(taocanPid+"#"+ valdateTaocan);
										var basp2Value = getAddPrds(
												"fujiacBox", "");//  附加菜单  值
										$("#basicPkg2").val(basp2Value);
										var baspk3Value = getAddPrds(
												"qiqiuTriBox", "");//  装饰  值
										$("#basicPkg3").val(baspk3Value);
										var moTimsValue = $("#modiTimedis")
												.val();
										$("#pmodiTime").val(moTimsValue);
										var moByidValue = $("#modibydis").val();
										$("#modiby").val(moByidValue);
										var url = '${basePath }parreserve/updateZhushi.shtml';
										$.messager
												.confirm(
														'修改套餐',
														'确认修改套餐?',
														function(r) {
															if (r) {
																$
																		.ajax({
																			url : url,
																			type : 'POST',
																			data : $(
																					"#form1")
																					.serialize(),//序列化表单里所有的内容
																			async : false,
																			error : function(
																					XMLHttpRequest) {
																				ajaxError(XMLHttpRequest);
																			},
																			success : function(
																					data) {
																				if (data != null) {
																					$.messager
																							.alert(
																									'提示',
																									'修改成功！',
																									'info');
																					var arr = [];
																					var jsonarray;
																					for ( var o in data) {
																						if (o == "pkParresId") {
																							document
																									.getElementById("pkParresId").value = data[o];
																						} else if (o == "listUpdateScmTaocan") {
																							jsonarray = data[o];
																							var divIdP = "$('#q').window('open')";
																							arr
																									.push('<table class="table">');
																							for (var k = 0; k < jsonarray.length; k++) {
																								jsonobj = jsonarray[k];
																								if (k == 0) {
																									arr
																											.push('<tr><td>主食1</td><td>'
																													+ jsonobj["cateName"]
																													+ '：'
																													+ jsonobj["prdName"]
																													+ ' </td>');
																									arr
																											.push('<td rowspan="${gblScmTaocanSize}"><input type="button" onClick=" '+divIdP+' " class="btn" value="修&nbsp;&nbsp;改"></td></tr>');
																								} else if (k == 1) {
																									arr
																											.push('<tr><td>主食2</td><td>'
																													+ jsonobj["cateName"]
																													+ '：'
																													+ jsonobj["prdName"]
																													+ ' </td></tr>');
																								} else if (k == 2
																										&& jsonobj["fkPrdcateId"] == "001007001002") {
																									arr
																											.push('<tr><td>主食3</td><td>'
																													+ jsonobj["cateName"]
																													+ '：'
																													+ jsonobj["prdName"]
																													+ ' </td></tr>');
																								} else {
																									arr
																											.push('<tr><td>'
																													+ jsonobj["cateName"]
																													+ '</td><td>'
																													+ jsonobj["prdName"]
																													+ '</td></tr>');
																								}
																							}
																							arr
																									.push('</table>');
																							var parTaocanDiv = document
																									.getElementById("parTaocan");
																							parTaocanDiv.innerHTML = arr
																									.join('');
																							$(
																									'#'
																											+ divId)
																									.window(
																											'close');
																						}

																					}

																				} else {
																					$.messager
																							.alert(
																									'提示',
																									'修改失败！',
																									'error');
																				}
																			}
																		});
															}
														});
									}
								}
							}
						} else {
							$.messager.alert('提示', '保存失败！', 'error');
						}
					}
				});
		//========

	}

	function nextSave() {
		if (!validaTuanForm()) {
		} else {
			var pkRoomIdtr = checkRoomId();
			var trueFlag = true;
			var fkPartypeId = $("#fkPartypeId").val();
			if (fkPartypeId == "") {
				$.messager.alert('提示', '请选择活动类型！', 'warning');
				$("#fkPartypeId").val("");
				refreshSelect();
				trueFlag = false;
				return;
			}

			var chdName = $("#chdName").val();
			if (chdName == "") {
				$.messager.alert('提示', '请点击"选择会员"按钮，查询出儿童姓名！', 'warning');
				trueFlag = false;
				return;
			}

			if (pkRoomIdtr == "") {
				$.messager.alert('提示', '请选择房间！', 'warning');
				document.getElementById("paidukaishi").value = "";
				refreshSelect();
				trueFlag = false;
				return;
			}
			var resDay = document.getElementById("presDay").value;
			if (resDay == "") {
				$.messager.alert('提示', '请选择日期！', 'warning');
				document.getElementById("paidukaishi").value = "";
				refreshSelect();
				trueFlag = false;
				return;
			}
			var paidukaishi = document.getElementById("paidukaishi").value;
			if (paidukaishi == "") {
				$.messager.alert('提示', '请选择时间！', 'warning');
				document.getElementById("paidukaishi").value = "";
				refreshSelect();
				trueFlag = false;
				return;
			} else {
				var timeArray = paidukaishi.split("-");
				document.getElementById("resTimeS").value = timeArray[0];
				document.getElementById("resTimeE").value = timeArray[1];
			}
			
			//=======  //此处的  验证总人数不能超过房间最大容量，否则提示“房间容量超限”
			 var resMemCnt =$("#resMemCnt").val();
			 if(resMemCnt==""){
				  $.messager.alert('提示','请输入人数！','warning');
				  trueFlag=false;
				  return  ;
			  }else{
				  var checkRoomArray =pkRoomIdtr.split(",");
				  var roomMax=0;
				  var roomMin=0;
				  for(var cc=0;cc<checkRoomArray.length;cc++){
					  for(var mm=0;mm<maxCntRoomArray.length;mm++){
						  var maxCntRoom = maxCntRoomArray[mm];
						  var roomsArray =maxCntRoom.split("@");
						  var roomid = roomsArray[0];
						  var maxCnt =roomsArray[2];
						  var minCnt =roomsArray[3];
						  if(roomid ==checkRoomArray[cc]){
							  roomMax =parseInt(maxCnt)+ parseInt(roomMax);
							  roomMin =parseInt(minCnt)+ parseInt(roomMin);
					  			 break;
					  		}
					  }
				  }
				  if(roomMax<resMemCnt){
					  $.messager.alert('提示','选择的房间最大人数是【'+roomMax+'】，容纳人数超限，请增加房间或减少人数。','warning');
					  trueFlag=false;
					  return  ;
				  }
				  if(roomMin> resMemCnt){
					  $.messager.alert('提示','人数 必须   大于 或等于 选择的房间最小人数【'+roomMin+'】。','warning');
					  trueFlag=false;
					  return  ;
				  }
			  }
			//======
			var valdateTaocan = validaUTaocan();
			if (trueFlag) {
				//======= ajax begin
				//=======ajax 根据房间编号，时间，查找是否 房间已经占用
				var pkParresId = document.getElementById("pkParresId").value;
				var url = '${basePath }parreserve/findAlreadyRoomList.shtml';
				$
						.ajax({
							url : url,
							type : 'POST',
							data : "roomId=" + pkRoomIdtr + "&presDay="
									+ resDay + "&resTimeS=" + timeArray[0]
									+ "&resTimeE=" + timeArray[1]
									+ "&pkParresId=" + pkParresId,
							async : false,
							error : function(XMLHttpRequest) {
								ajaxError(XMLHttpRequest);
							},
							success : function(data) {
								if (data != null) {
									var parReserveList;
									for ( var o in data) {
										if (o == "parReserveList") {
											jsonarray = data[o];
											if (jsonarray != null
													&& jsonarray.length > 0) {
												var resTimestext;
												var resTimeEtext;
												var roomName = "(";
												for (var k = 0; k < jsonarray.length; k++) {
													var jsonobj = jsonarray[k];
													if (jsonobj != null) {
														resTimestext = jsonobj["resTimeS"];
														resTimeEtext = jsonobj["resTimeE"];
														roomName += jsonobj["roomName"]
																+ " ";
													}
												}
												roomName += ")";
												var msg = resDay
														+ " "
														+ resTimestext
														+ "-"
														+ resTimeEtext
														+ " 时间段的房间"
														+ roomName
														+ " 已经被预约，请重新选择时间段或 房间！";
												$.messager.alert('提示', msg,
														'warning');
												document
														.getElementById("paidukaishi").value = "";
												refreshSelect();

												return;
											} else {
												$("#roomIds").val(pkRoomIdtr);
												var taocanPid =getNowWeekDayToPrdId(resDay);
												$("#basicPkg").val(taocanPid+"#"+ valdateTaocan);
												var basp2Value = getAddPrds(
														"fujiacBox", "");//  附加菜单  值
												$("#basicPkg2").val(basp2Value);
												var baspk3Value = getAddPrds(
														"qiqiuTriBox", "");//  装饰  值
												$("#basicPkg3")
														.val(baspk3Value);
												var moTimsValue = $(
														"#modiTimedis").val();
												$("#pmodiTime")
														.val(moTimsValue);
												var moByidValue = $(
														"#modibydis").val();
												$("#modiby").val(moByidValue);
												var url = '${basePath }parreserve/saveParReserve.shtml';
												$
														.ajax({
															url : url,
															type : 'POST',
															data : $("#form1")
																	.serialize(),//序列化表单里所有的内容
															async : false,
															error : function(
																	XMLHttpRequest) {
																ajaxError(XMLHttpRequest);
															},
															success : function(
																	data) {
																if (data != null) {
																	var pkParresIdold;
																	var orderPk;
																	var zhucanPrice;
																	var OldpkOrderId;
																	for ( var o in data) {
																		if (o == "pkParresId") {
																			pkParresIdold = data[o];
																		} else if (o == "orderPk") {
																			orderPk = data[o];
																		}else if (o == "OldpkOrderId") {
																			OldpkOrderId = data[o];
																		} else if (o == "zhucanPrice") {
																			zhucanPrice = data[o];
																		} else if (0 == "parReserveRoomList") {
																			jsonarray = data[o];
																			if (jsonarray != null
																					&& jsonarray.length > 0) {
																				var resTimestext;
																				var resTimeEtext;
																				var roomName = "(";
																				for (var k = 0; k < jsonarray.length; k++) {
																					var jsonobj = jsonarray[k];
																					if (jsonobj != null) {
																						resTimestext = jsonobj["resTimeS"];
																						resTimeEtext = jsonobj["resTimeE"];
																						roomName += jsonobj["roomName"]
																								+ " ";
																					}
																				}
																				roomName += ")";
																				var msg = resDay
																						+ " "
																						+ resTimestext
																						+ "-"
																						+ resTimeEtext
																						+ " 时间段的房间"
																						+ roomName
																						+ " 已经被预约，请重新选择时间段或 房间！";
																				$.messager
																						.alert(
																								'提示',
																								msg,
																								'warning');
																				$(
																						"#paidukaishi")
																						.val(
																								"");
																				refreshSelect();
																				break;
																				return;
																			}
																		}
																	}
																	var parType = $(
																			"#grpFlag")
																			.val();
																	window.location.href = '${basePath }parreserve/saveNextParReserve.shtml?OldpkOrderId='+OldpkOrderId+'&pkParresId='
																			+ pkParresIdold
																			+ '&parType='
																			+ parType
																			+ '&orderPk='
																			+ orderPk
																			+ '&zhucanPrice='
																			+ zhucanPrice
																			+ '&deviceType=pad';
																} else {
																	$.messager
																			.alert(
																					'提示',
																					'保存失败！',
																					'error');
																}
															}
														});
											}
										}
									}
								} else {
									$.messager.alert('提示', '保存失败！', 'error');
								}
							}
						});
				//========
				//======= ajax end
			}
		}
	}
	function loadAlreadyRoom() {
		var parReserveRoomList = '${parReserveRoomList}';
		if (parReserveRoomList != null) {
			<c:forEach items="${parReserveRoomList}" var="parReserveRoom" varStatus="status">
			var pkRoomid = "pkRoomid${parReserveRoom.fkRoomId}";
			var roomCheckbox = document.getElementById(pkRoomid);
			if (roomCheckbox != null) {
				roomCheckbox.checked = true;
			}
			</c:forEach>
		}

	}
	function radioShow(id) {
		var myradio = document.getElementsByName("type_r");
		for (var i = 0; i < myradio.length; i++) {
			if (myradio[i].checked) {
				if (id == 'r1')
					window.location.href = "${basePath }parreserve/toPadReserveNew.shtml?parType=0&pkParresId="
							+ pkParresIdOld + "&pkOrderId=" + pkOrderIdOld;
				else
					window.location.href = "${basePath }parreserve/toPadTuanTiReserveNew.shtml?parType=1&pkParresId="
							+ pkParresIdOld + "&pkOrderId=" + pkOrderIdOld;
			}
		}
	}

	function hiddenSelected(divIds) {
		var noneZhuDivId = divIds.substring(divIds.indexOf("_"), divIds.length);
		var divId = divIds.substring(0, divIds.indexOf("_"));
		document.getElementById(divId).checked = false;
		document.getElementById(noneZhuDivId).style.display = 'none';

	}

	function saveParReserve() {//saveCusextcfg div
		window.location.href = "insertParReserve.shtml";
	}

	function setQueryMember() {
		 $('#setQueryMember').window('open');
		 $('#queryMemName').val('');
	}
	function queryMember(obj) {
		var memberValue = $("#queryMemName").val();
		if (memberValue == "") {
			$.messager.alert('提示', '请输入会员 的 姓名/电话！', 'warning');
			return false;
		}
		$.ajax({
			cache : false,
			type : "get",
			dataType : "json",
			url : "${basePath}membership/single/queryMember.shtml",
			data : "nameOrTel=" + encodeURI(encodeURI(memberValue)),
			complete : function() {
			},
			error : function(XMLHttpRequest) {
				ajaxError(XMLHttpRequest);
			},
			success : function(msg) {//msg为返回的数据，在这里做数据绑定
				if (msg == null) {
					alertInfo("没有匹配的会员!");
				} else {
					
					$("#ajaxmemName").val(memberValue);
					queryMemberList();
				}
				return;
			}
		});
	}
	function setMemberList(data) {
		if (data.results != null && data.results!="") {
			$.each(data.results, function(ind, obj) {
				var ostatus = obj.status;
				if (ostatus == "1") {
					ostatus = "未激活";
				} else if (ostatus == "2") {
					ostatus = "有效";
				} else if (ostatus == "3") {
					ostatus = "过期";
				} else if (ostatus == "4") {
					ostatus = "停卡";
				} else if (ostatus == "5") {
					ostatus = "新建";
				} else {
					ostatus = "-";
				}
				var memCardName = obj.memberCardName;
				if (memCardName == null) {
					memCardName = "-";
				}
				var oisVip = obj.isVip;
				if (oisVip == "1") {
					oisVip = "是";
				} else {
					oisVip = "否";
				}
				var startD ="";
				var startend ="";
				if(null !=obj.startDate){
				  startD = getSmpFormatDate(new Date(obj.startDate), false);
				}
				if(null !=obj.endDate){
				  startend = getSmpFormatDate(new Date(obj.endDate), false);
				}
				var memName = obj.memName;
				if (null != memName) {
					if (memName.length > 10) {
						memName = memName.substring(0, 10) + "...";
					}
				}
				var getName = 'getMemberName("' + obj.pkMemId + '","'
						+ obj.memName + '")';
				var htm = "<tr>";
				htm += "<td class='lv'><a href='javascript:"+getName+"'>" + obj.pkMemId
						+ "</a></td>";
				htm += " <td>" + ostatus + "</td>";
				htm += " <td>" + memName + "</td>";
				htm += " <td>" + obj.sex + "</td>";
				htm += " <td>" + obj.age + "</td>";
				htm += " <td>" + obj.country + "</td>";
				htm += " <td>" + oisVip + "</td>";
				htm += " <td>" + memCardName + "</td>";
				htm += " <td>" + startD + " - " + startend + "</td>";
				htm += "</tr>";

				$("#tableQueryMember").append(htm);
			});
		}else{
			alertInfo("没有匹配的会员!");
		}
	}
	
	//ajax获取会员列表的信息
	function queryMemberList() {
		$.ajax({
			url:"${basePath }parreserve/pageQueryMemberList.shtml",
			dataType:"json",
			data : $("#formQueryMember").serialize(),//序列化表单里所有的内容
			type:"post",
			async:false,
			success:function(data){
				//==
					setMemberList(data);
				//==
			}
		});
	}
	function getMemberName(mid, name) {
		$("#fkMemId").val(mid);
		$("#chdName").val(name);
		$('#setQueryMember').window('close');
	}
	function checkRoomId() {
		var str = document.getElementsByName("pkRoomId");
		var pkRoomIdtr = "";
		for (var i = 0; i < str.length; i++) {
			if (str[i].checked) {
				pkRoomIdtr += str[i].value + ",";
			}
		}
		if (pkRoomIdtr.substring(pkRoomIdtr.length - 1, pkRoomIdtr.length) == ",") {
			pkRoomIdtr = pkRoomIdtr.substring(0, pkRoomIdtr.length - 1);
		}
		return pkRoomIdtr;

	}
	function changeStartTime() {
		var pkRoomIdtr = checkRoomId();
		if (pkRoomIdtr == "") {
			$.messager.alert('提示', '请选择房间！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return false;
		}
		var resDay = $("#presDay").val();
		if (resDay == "") {
			$.messager.alert('提示', '请选择日期！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return false;
		}
		var paidukaishi = $("#paidukaishi").val();
		if (paidukaishi == "") {
			$.messager.alert('提示', '请选择时间！', 'warning');
			$("#paidukaishi").val("");
			refreshSelect();
			return false;
		}
		var timeArray = paidukaishi.split("-");
		$("#resTimeS").val(timeArray[0]);
		$("#resTimeE").val(timeArray[1]);
		var pkParresId = $("#pkParresId").val();
		//=======ajax 根据房间编号，时间，查找是否 房间已经占用
		var url = '${basePath }parreserve/findAlreadyRoomList.shtml';
		$.ajax({
			url : url,
			type : 'POST',
			data : "roomId=" + pkRoomIdtr + "&presDay=" + resDay + "&resTimeS="
					+ timeArray[0] + "&resTimeE=" + timeArray[1]
					+ "&pkParresId=" + pkParresId,
			async : false,
			error : function(XMLHttpRequest) {
				ajaxError(XMLHttpRequest);
			},
			success : function(data) {
				if (data != null) {
					var parReserveList;
					for ( var o in data) {
						if (o == "parReserveList") {
							jsonarray = data[o];
							if (jsonarray != null && jsonarray.length > 0) {
								var resTimestext;
								var resTimeEtext;
								var roomName = "(";
								for (var k = 0; k < jsonarray.length; k++) {
									var jsonobj = jsonarray[k];
									if (jsonobj != null) {
										resTimestext = jsonobj["resTimeS"];
										resTimeEtext = jsonobj["resTimeE"];
										roomName += jsonobj["roomName"] + " ";
									}
								}
								roomName += ")";
								var msg = resDay + " " + resTimestext + "-"
										+ resTimeEtext + " 时间段的房间" + roomName
										+ " 已经被预约，请重新选择时间段或 房间！";
								$.messager.alert('提示', msg, 'warning');
								$("#paidukaishi").val("");
								refreshSelect();

								return false;
							} else {
								return true;
							}
						}
					}
				} else {
					$.messager.alert('提示', '保存失败！', 'error');
				}
			}
		});
		//========
	}

	window.onload = function() {
		var $numInfo = document.getElementById('num_info'), $num = document
				.getElementById('conMobile'), _val, _val1, _val2;
		$num.onkeyup = function() {
			var val = this.value = this.value.replace(/[^\d]/g, ''), len = val.length;
			if (val != '') {
				$numInfo.style.display = 'block';
			}
			if (len <= 3) {
				_val = _val1 = val.substr(0, 3);
			} else if (len > 3 && len <= 7) {
				_val1 = val.substr(0, 3);
				_val = _val2 = _val1 + "-" + val.substr(3, len);
			} else if (len > 7) {
				_val2 = val.substr(0, 3) + "-" + val.substr(3, 4);
				_val = _val2 + '-' + val.substr(7, len);
			}
			$numInfo.innerHTML = _val;
		}
		$num.onblur = function() {
			$numInfo.style.display = 'none';
		}
	}

	function tomorrow() {
		var tommorrow = new Date();
		tommorrow.setDate(tommorrow.getDate() + 1);
		return getSmpFormatDate(tommorrow, "");
	}
	/**
	var validHolidays="";
	function jiaqiDisable(){
		  var jsonarray="${dateDayCountList}";
		   var dateStr="";
		 if(jsonarray!=null && 0<jsonarray.length){
			 
		  dateStr="(";
		  <c:forEach items="${dateDayCountList}" var="dateDay" varStatus="status">
		  <c:choose>
			<c:when test="${status.index==0}">	
		       dateStr +="${dateDay}";
		     </c:when>
		     <c:otherwise>
		        dateStr +="|${dateDay}";
		     </c:otherwise>
		  </c:choose>
		 </c:forEach>
		 dateStr +=")";
		 }
		return  validHolidays =dateStr;
	}
	**/
	function checkpcount(){//检测 输入的人数是否符合 房间 的 容纳 范围
		var pkRoomIdtr = checkRoomId();
		if (pkRoomIdtr == "") {
			$.messager.alert('提示', '请选择房间！', 'warning');
			$("#resTimeS").val("");
			refreshSelect();
			return false;
		}
		var resMemCnt = $("#resMemCnt").val();
		if (resMemCnt == "") {
			$.messager.alert('提示', '请输入人数！', 'warning');
			return;
		} else {
			//此处的  验证总人数不能超过房间最大容量，否则提示“房间容量超限”

			var checkRoomArray = pkRoomIdtr.split(",");
			var roomMax = 0;
			var roomMin = 0;
			for (var cc = 0; cc < checkRoomArray.length; cc++) {
				for (var mm = 0; mm < maxCntRoomArray.length; mm++) {
					var maxCntRoom = maxCntRoomArray[mm];
					var roomsArray = maxCntRoom.split("@");
					var roomid = roomsArray[0];
					var maxCnt = roomsArray[2];
					var minCnt = roomsArray[3];
					if (roomid == checkRoomArray[cc]) {
						roomMax = parseInt(maxCnt) + parseInt(roomMax);
						roomMin = parseInt(minCnt) + parseInt(roomMin);
						break;
					}
				}
			}
			if (roomMax < resMemCnt) {
				$.messager.alert('提示', '选择的房间最大人数是【' + roomMax
						+ '】，容纳人数超限，请增加房间或减少人数。', 'warning');
				trueFlag = false;
				return;
			}
			if (roomMin > resMemCnt) {
				$.messager.alert('提示', '人数 必须   大于 或等于 选择的房间最小人数【'
						+ roomMin + '】。', 'warning');
				return;
			}
		}
	}
</script>
<title>嘉童游乐中心</title>
</head>
<body class="bg">
<div class="top"><a class="icon iconfont fl ml10" href="${basePath }parreserve/reservationPage.shtml">&#xe612;</a>预约<a href="javascript:nextSave()" class="fr">下一步</a>
 </div>
<div class="i_index fixed">
<div class="i_index_z fl oh">
    	<ul class="i_index_tab m20 fixed" id="tab_c">
            <li class="border_radius_l">排队/团体信息</li>
            <li>搭配套餐</li>
            <li>附加菜单</li>
            <li class="border_radius_r">装饰用品</li>
        </ul>
       	<!----内容-->
        <div class="clear"></div>
        <ul id="tab_conbox_c">
        	<li>
            	<div class="clear"></div>
                <div class="paidu">
                    <ul id="tab_e">
                       <c:if test="${pkOrderId==''}">
                        <li><input type="radio" name="type_r" id="r1" onClick="radioShow('r1');" class="mr5">派对</li>
                        <li><input type="radio" name="type_r" onClick="radioShow('r2');"  id="r2" class="mr5" checked>团体</li>
                      </c:if>
                      <c:if test="${pkOrderId!=''}">
		        	    <c:choose>
		        	    	<c:when test="${parType=='1'}"><li>&nbsp;团体 </li></c:when>
		        	    	 <c:otherwise><li>&nbsp;派对 </li></c:otherwise>
		        	    </c:choose>
		        	</c:if>
                    </ul>
                </div>
                <form name="form1" action="" id="form1">
                <ul id="tab_conbox_e">
                	<li>
                    	<!---------------->
                        <div class="mana_reg_dl_ix mt20 fl">
                            <dl>
                            	<dt><label>活动类型：</label>
                                    <!----select--->
                                    <div class="uboxstyle">
                	 
				                        <select name="fkPartypeId" id="fkPartypeId">
				                           <option value="" >请选择</option>
				                    	       <c:forEach items="${cTypeList}" var="cType" varStatus="status">
				                            <option value="${cType.pkPartypeId}" >${cType.parType}</option>
				                            </c:forEach>
				                        </select>
				                    </div>
                                    <!----select--->
                                </dt>
                                <dt><label><font style="color:#F00">*</font>主题：</label><input  ${disableIsShow} type="text" maxlength="30"  id="subject"  name="subject" value="${parreserveOld.subject}" class="iput_t w200"></dt>
                                <dt><label><font style="color:#F00">*</font>联系人：</label><input type="text"  ${disableIsShow} maxlength="30" name="conName" id="conName"  class="iput_t w200" value="${parreserveOld.conName}"></dt>
                                <dt><label>儿童姓名：</label>
									<input  ${disableIsShow} id="chdName" value="${parreserveOld.chdName}" name="chdName" type="text" class="iput_t w100">&nbsp;&nbsp;
			                       <input type="hidden" name="fkMemId" id="fkMemId">
			                       <c:choose>
			                        <c:when test="${disableIsShow=='disabled'}">
			                         <input type="button" value="选择会员"   class="btn_no">
			                        </c:when>
			                        <c:otherwise>
			                         <input type="button" value="选择会员" onclick="setQueryMember()" class="btn">
			                       </c:otherwise>
			                       </c:choose>
								</dt>
                                <dt><label>固话：</label>
									<input  ${disableIsShow} type="text" name="conTel" id="conTel" maxlength="20" class="iput_t w200" value="${parreserveOld.conTel}">
			                    	<input type="hidden" name="basicPkg" id="basicPkg"  value="${parreserveOld.basicPkg}">
			                    	<input type="hidden" name="pkParresId" id="pkParresId" value="${pkParresId}">
			                    	<input type="hidden" name="pmodiTime" id="pmodiTime">
									<input type="hidden" name="modiBy" id="modiby"  value="${parreserveOld.modiBy}">
			                    	<input type="hidden" name="basicPkg2" id="basicPkg2" value="${parreserveOld.basicPkg2}">
			                    	<input type="hidden" name="basicPkg3" id="basicPkg3" value="${parreserveOld.basicPkg3}">
			                    	<input type="hidden" name="paramtype" id="paramtype">
			                    	<input type="hidden" name="resTimeS" id="resTimeS" value="${parreserveOld.resTimeS}">
			                    	<input type="hidden" name="resTimeE" id="resTimeE" value="${parreserveOld.resTimeE}">
			                    	<input type="hidden" name="roomIds" id="roomIds"  value="${parreserveOld.roomIds}">
			                    	<input type="hidden" name="grpFlag" id="grpFlag" value="${parType}">
								</dt>
                                <dt><label><font style="color:#F00">*</font>手机：</label>
				                    <div class="formx fl">
				                      <span id="num_info" for="conMobile"></span>
				                      <input id="conMobile"  ${disableIsShow} name="conMobile" type="text" maxlength="11" class="iput_t w200" value="${parreserveOld.conMobile}">
				                    </div>
								</dt>
                                <dt><label>Email：</label><input  ${disableIsShow} type="text" name="conEmail" maxlength="50" id="conEmail" class="iput_t w200" value="${parreserveOld.conEmail}"></dt>
                                <dt><label><font style="color:#F00">*</font>房间：</label>
                                    <div class="fangjain">
                                     <c:forEach items="${listRoom}" var="roomf">
			                    	    <c:choose>
			                    	      <c:when test="${roomf.pkRoomId=='1'}">
			                    	      </c:when>
			                    	      <c:otherwise>
			                                        <p><input type="checkbox" class="mr5" name="pkRoomId" id="pkRoomid${roomf.pkRoomId}" value="${roomf.pkRoomId}">${roomf.roomName}</p>
			                    	      </c:otherwise>
			                    	    </c:choose>
			                            
			                            </c:forEach>
                                    </div>
                                </dt>
                            </dl>
                            <dl>
                                <dt><label><font style="color:#F00">*</font>日期：</label>
                                    <c:choose>
				                     <c:when test="${showDaycontrols=='lessFifteen' }">
				                      <input id="presDay" name="presDay" value="${parreserveOld.presDay}" type="text"  class="Wdate iput_t w200"   readonly="readonly" title="举办日期在15日之内，不允许改期" >
				                     </c:when>
				                     <c:otherwise>
				                    	<input id="presDay" name="presDay" value="${parreserveOld.presDay}" type="text"  class="Wdate iput_t w200"   onClick="WdatePicker({dateFmt:'yyyy-MM-dd ',minDate:'#F{tomorrow()}',isShowToday:false,isShowWeek:true,isShowClear:true,readOnly:true})" >
				                   	</c:otherwise><!-- disabledDates:['#F{jiaqiDisable()}'], -->
				                    </c:choose>
                                </dt>
                                <dt><label><font style="color:#F00">*</font>时间：</label>
                                    <div class="uboxstyle">
			                        <select name="paidukaishi" id="paidukaishi" onchange="changeStartTime()">
								    	 <option value="">请选择</option>
								    	 <option value="0900-1100">9:00-11:00</option>
								    	 <option value="0930-1130">9:30-11:30</option>
								    	<option value="1000-1200">10:00-12:00</option>
								    	<option value="1030-1230">10:30-12:30</option>
								    	<option value="1100-1300">11:00-13:00</option>
										<option value="1130-1330">11:30-13:30</option>
										<option value="1200-1400">12:00-14:00</option>
										<option value="1230-1430">12:30-14:30</option>
								    	<option value="1300-1500">13:00-15:00</option>
										<option value="1330-1530">13:30-15:30</option>
										<option value="1400-1600">14:00-16:00</option>
										<option value="1430-1630">14:30-16:30</option>
										<option value="1500-1700">15:00-17:00</option>
										<option value="1530-1730">15:30-17:30</option>
										<option value="1600-1800">16:00-18:00</option>
										<option value="1630-1830">16:30-18:30</option>
										<option value="1700-1900">17:00-19:00</option>
										<option value="1730-1930">17:30-19:30</option>
										<option value="1800-2000">18:00-20:00</option>
										<option value="1830-2030">18:30-20:30</option>
										<option value="1900-2100">19:00-21:00</option>
										<option value="1930-2130">19:30-21:30</option> 
										<option value="2000-2200">20:00-22:00</option>
								    </select>  </div>
								</dt>
                                <dt><label><font style="color:#F00">*</font>人数：</label>
									 <input type="text" name="resMemCnt" id="resMemCnt" class="iput_t w100" maxlength="3" value="${parreserveOld.resMemCnt}"  onkeyup="this.value=this.value.replace(/\D/g,'')" onblur="checkpcount()"   onafterpaste="this.value=this.value.replace(/\D/g,'')">
								</dt>
								<dt>
                                	<label>加时时长：</label>
							  				  <span id="jia_end"  >
							    				<div class="uboxstyle_small">
							                        <select name="overTime" id="overTime" >
							                       		 <option value="">请选择</option>
							                            <option value="1">1小时</option>
							                             <option value="2">2小时</option>
							                        </select>
							                    </div> 
							    </span>
                                </dt>
     							<dt>
                                	<label>加时房间类型：</label>
							  				  <span id="jia_end"  >
							    				<div class="uboxstyle_small">
							                        <select name="fkOtprdId" id="fkOtprdId" >
							                       		 <option value="">请选择</option>
							                             <option value="ZBSP141126002">大房间</option>
							                             <option value="ZBSP141126001">小房间</option>
							                        </select>
							                    </div> 
							    </span>
                                </dt>
                                <dt><label class="vt">备注：</label>
								  <textarea name="comments" maxlength="150" ${disableIsShow} class="textare w200">${parreserveOld.comments}</textarea>
								</dt>
                                <dt><label>操作人：</label><input type="text"   class=" iput_t w200" value="${modiName}"   disabled >
                                	<input type="hidden" name="modibydis"  id="modibydis" class=" iput_t w200" value="${modiBy}"    >
                                </dt>
                                <dt><label>操作时间：</label><input type="text" name="modiTimedis" id="modiTimedis" class=" iput_t w200"    disabled ></dt>
                                 <dt id="parstatus"></dt><dt> &nbsp;&nbsp;(已改期${parreserveOld.modiTimeCnt}次) <input   value="${parreserveOld.modiTimeCnt}" name="modiTimeCnt"   type="hidden"   ></dt>
                                 <dt><label>&nbsp;</label><input type="button" class="btn" value="保存"></dt>
                            </dl>
                        </div>
                    </li>
                    
                </ul>
                </form>
                <form action="${basePath }parreserve/paginateFujia.shtml" method="post" id="formFujia4">
							<input type="hidden" name="pageSize" value="4"> <input
								type="hidden" name="pageNo" value="1">  
		</form>
        <form action="${basePath }parreserve/paginateZhuangshi.shtml" method="post" id="formZhuangshi4">
		<input type="hidden" name="pageSize" value="4"> <input
			type="hidden" name="pageNo" value="1">  
	</form>
	
	        <form action="${basePath }parreserve/addPageFujia.shtml?addType=fujia" method="post" id="addformFujia4">
							<input type="hidden" name="pageSize" value="400">
							<input type="hidden" name="deviceType" value="pad">  
							 <input	type="hidden" name="pageNo" value="1"> 
								<input type="hidden" name="basicPkg2" id="addbasicPkg2" value="${parreserveOld.basicPkg2}">
		</form>
        <form action="${basePath }parreserve/addPageZhuangshi.shtml?addType=zhuangs" method="post" id="addformZhuangshi4">
		<input type="hidden" name="pageSize" value="400"> <input type="hidden" name="pageNo" value="1">
		<input type="hidden" name="deviceType" value="pad">  
			<input type="hidden" name="basicPkg3" id="addbasicPkg3" value="${parreserveOld.basicPkg3}"> 
	</form>
            </li>
            <li class="dsly_n">
            	<div class="zhushi">
            	<div id="parTaocan">
                        </div>
                <!----底部按钮----->
                <div class="btm_btn mt10">
                        <dl>
                            <dd><input type="button" class="btn" value="修改" onclick="openCengValid('#q')"></dd>
                        </dl>
                </div>
                <!----底部按钮----->
                </div>
            </li>
              <li class="dsly_n">
            	<div class="zhushi">
            	          <div id="dfujiaTableDiv" style="display:none">
                        <table class="table" id="fujiaTable">
                            <tr>
                                <th>商品</th>
                                <th>价格(元)</th>
                                <th>数量</th>
                                <th>操作</th>
                            </tr>
                           
                        </table>
                        </div>
                        <div id="addfujiaTableDiv" style="display:none">
                      	  <table class="table" id="addfujiaTable"  >
                            <tr>
                                <th>商品</th>
                                <th>价格(元)</th>
                                <th>数量</th>
                                <th>操作</th>
                            </tr>
                       	 </table>
                         </div>
                <!----底部按钮----->
                <div class="btm_btn mt10">
                        <dl>
                            <dd><input type="button" class="btn" value="修改" onclick="openCengValid('#fujia')"></dd>
                        </dl>
                </div>
                <!----底部按钮----->
                </div>
            </li>
            <li class="dsly_n">
            	<div class="zhushi">
              <table class="table" id="trimmingtable" >
                            <tr>
                                <th>商品</th>
                                <th>价格(元)</th>
                                <th>数量</th>
                                <th>操作</th>
                            </tr>
                        </table>
                        <div id="addtrimmingtableDiv" style="display:none">
	                        <table class="table" id="addtrimmingtable"  >
	                            <tr>
	                                <th>商品</th>
	                                <th>价格(元)</th>
	                                <th>数量</th>
	                                <th>操作</th>
	                            </tr>
	                        </table>
	                        <div class="page fr m10" id="foot2" style="display:none">
							</div>
							<div class="page fr m10" id="addfoot2"  style="display:none">
							</div>
                        </div>
                </div>
                <!----底部按钮----->
                <div class="btm_btn mt10">
                        <dl>
                            <dd><input type="button" class="btn" value="修改" onclick="openCengValid('#p')"></dd>
                              
                        </dl>
                </div>
                <!----底部按钮----->
            </li>
        </ul>		
        <!---内容--->
    </div>
</div>








<!---修改套餐--->
<div id="q" class="easyui-window" title="修改套餐" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:840px; height:650px; position:relative;">
	
     <div class="order_add_yix fixed">
        <dl>
            <dt>已选主食：</dt>
           <div id="alreadyZhu">
           </div>
        </dl>
        <dl>
            <dt>已选配菜：</dt>
             <div id="alreadyPeiCai">
                </div>
        </dl>
        <dl>
            <dt>已选饮料：</dt>
            <div id="alreadyYinl">
                </div>
        </dl>
    </div>
    
    <div class="taocan">
            <ul class="i_index_tab  m20 fixed" id="tab_d">
                <li class="border_radius_l">主餐(选3)</li>
                <li>配菜(选1)</li>
                <li class="border_radius_r">饮料(选1)</li>
            </ul>
            <div class="clear"></div>
      <div id="cengzhushi">
       
       </div>
    	</div>
        
        
    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onClick="javascript:editTaocanControl('q')" value="确定"></dd>
            <dd><input type="button" class="btn" onClick="javascript:closeDiv('q','')" value="取消"></dd>
        </dl>
    </div>
</div>
<!---修改套餐--->


<!---新增附加套餐--->
<div id="fujia" class="easyui-window" title="新增附加菜单" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:820px; height:400px; position:relative;">
	
    <div class="m10">
    	<dl class="order_add_peic fl">
            <div id="addhoverre" class="peic_hover"><dt ><a href="javascript:addFujiaCate('addhoverre')">热食</a></dt></div>
			          <div id="addhoverleng" > <dt><a href="javascript:addFujiaCate('addhoverleng')">冷食</a></dt></div>
                	<div id="addPeicai" > <dt><a href="javascript:addFujiaCate('addPeicai')">配菜</a></dt></div>
                	<div id="addTdian" > <dt><a href="javascript:addFujiaCate('addTdian')">甜点</a></dt></div>
                	<div id="addyliao" > <dt><a href="javascript:addFujiaCate('addyliao')">饮料</a></dt></div>
                	<div id="addwine" > <dt><a href="javascript:addFujiaCate('addwine')">酒类 （仅限 成人）</a></dt></div>
        </dl>
        <dl class="fl order_add_peib">
             <div id="addjiaRe">
	                   <c:forEach items="${listGblFUjiaRe}" var="jiaRe" varStatus="status">
	                    <dd><input type="checkbox" id="fujiacBox${jiaRe.pkPrdId}" name="fujiacBox" value="${jiaRe.pkPrdId}">${jiaRe.prdName}</dd>
	                  </c:forEach>
	                  </div>
	                  <div id="addjiaLeng" style="display:none">
	                   <c:forEach items="${listGblFUjiaLeng}" var="jiaLeng" varStatus="status">
	                    <dd><input type="checkbox" id="fujiacBox${jiaLeng.pkPrdId}" name="fujiacBox" value="${jiaLeng.pkPrdId}">${jiaLeng.prdName}</dd>
	                  </c:forEach>
	                  </div>
	                  <div id="addJiapeicai" style="display:none">
	                   <c:forEach items="${listGblFUjiapeicai}" var="jiapeicai" varStatus="status">
	                    <dd><input type="checkbox" id="fujiacBox${jiapeicai.pkPrdId}" name="fujiacBox" value="${jiapeicai.pkPrdId}">${jiapeicai.prdName}</dd>
	                  </c:forEach>
	                  </div>
	                  <div id="addjiaTdian" style="display:none">
	                   <c:forEach items="${listGblparFUjiaTdian}" var="jiaTdian" varStatus="status">
	                    <dd><input type="checkbox" id="fujiacBox${jiaTdian.pkPrdId}" name="fujiacBox" value="${jiaTdian.pkPrdId}">${jiaTdian.prdName}</dd>
	                  </c:forEach>
	                  </div>
	                  <div id="addjiaYliao" style="display:none">
	                   <c:forEach items="${listGblparFUjiaYinliao}" var="jiaYliao" varStatus="status">
	                    <dd><input type="checkbox" id="fujiacBox${jiaYliao.pkPrdId}" name="fujiacBox" value="${jiaYliao.pkPrdId}">${jiaYliao.prdName}</dd>
	                  </c:forEach>
		                  </div>
		                  <div id="addjiaWine" style="display:none">
		                   <c:forEach items="${listGblparFUjiaWine}" var="jiaWine" varStatus="status">
		                    <dd><input type="checkbox" id="fujiacBox${jiaWine.pkPrdId}" name="fujiacBox" value="${jiaWine.pkPrdId}">${jiaWine.prdName}</dd>
		                  </c:forEach>
		                  </div>
        </dl>
    </div>
    
    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onClick="javascript:fujiaDiv('fujia')" value="确定"></dd>
            <dd><input type="button" class="btn" onClick="javascript:closeDiv('fujia','')" value="取消"></dd>
        </dl>
    </div>
</div>


<!---新增装饰物--->
<div id="p" class="easyui-window" title="新增装饰物" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:820px; height:400px; position:relative;">
	
    <div class="m10">
    	<dl class="order_add_peic fl">
            <div id="addTrQiqiu" class="peic_hover"><dt ><a href="javascript:addTrimCate('addTrQiqiu')">气球</a></dt></div>
			          <div id="addTrPDingzhi" > <dt><a href="javascript:addTrimCate('addTrPDingzhi')">相片定制类</a></dt></div>
                	<div id="addTrCaidanl" > <dt><a href="javascript:addTrimCate('addTrCaidanl')">彩蛋类</a></dt></div>
                	<div id="addTrbiaoyl" > <dt><a href="javascript:addTrimCate('addTrbiaoyl')">表演类</a></dt></div>
        </dl>
        <dl class="fl order_add_peib">
           			<div id="addqiqiuTri">
	                   <c:forEach items="${listGblTrimmingQiqiu}" var="qiqiuTri" varStatus="status">
	                    <dd><input type="checkbox" id="addqiqiu${qiqiuTri.pkPrdId}" name="qiqiuTriBox" value="${qiqiuTri.pkPrdId}">${qiqiuTri.prdName}</dd>
	                  </c:forEach>
	                  </div>
	                  <div id="addDingzhiTri" style="display:none">
	                   <c:forEach items="${listGblTrimmingDingzhi}" var="dingzhiTri" varStatus="status">
	                    <dd><input type="checkbox" id="addqiqiu${dingzhiTri.pkPrdId}" name="qiqiuTriBox" value="${dingzhiTri.pkPrdId}">${dingzhiTri.prdName}</dd>
	                  </c:forEach>
	                  </div>
	                  <div id="addcaidanTri" style="display:none">
	                   <c:forEach items="${listGblTrimmingCDan}" var="caidanTri" >
	                    <dd><input type="checkbox" id="addqiqiu${caidanTri.pkPrdId}" name="qiqiuTriBox" value="${caidanTri.pkPrdId}">${caidanTri.prdName}</dd>
	                  </c:forEach>
	                  </div>
	                  <div id="addbiaoyTri" style="display:none">
	                   <c:forEach items="${listGblTrimmingBiao}" var="biaoyTri" varStatus="status">
	                    <dd><input type="checkbox" id="addqiqiu${biaoyTri.pkPrdId}" name="qiqiuTriBox" value="${biaoyTri.pkPrdId}">${biaoyTri.prdName}</dd>
	                  </c:forEach>
	                  </div>
        </dl>
    </div>
    
    <div class="btm_btn btm_bg">
    	<dl>
        	<dd><input type="button" class="btn" onClick="javascript:fujiaDiv('p')" value="确定"></dd>
            <dd><input type="button" class="btn" onClick="javascript:closeDiv('p','')" value="取消"></dd>
        </dl>
    </div>
</div>
<!---新增装饰物--->

 



<!---会员条件查询--->
<div id="setQueryMember" class="easyui-window" title="会员条件查询" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:800px; height:520px; position:relative;">
    <div class="m20">姓名/电话:<input type="text" class="iput_t w200" id="queryMemName" onkeydown="if(event.keyCode==13) {queryMember(this);}">
    <input type="button" class="btn ml10" onclick="queryMember('')" value="查询"></div>
    <div class="m10">
    
    
    
<div id="scrollTable">
        <table class="table">
            <col width="100px"></col>
            <col width="50px"></col>
            <col width="50px"></col>
            <col width="50px"></col>
            <col width="50px"></col>
            <col width="50px"></col>
            <col width="50px"></col>
            <col width="200px"></col>
            <col></col>
            <tbody>
                <tr>
                    <th>会员</th>
                    <th>状态</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th>国籍</th>
                    <th>VIP</th>
                    <th>会员类型</th>
                    <th>有效期限</th>
                </tr>
            </tbody>
        </table>
    <div>
    <table class="table">
        <col width="100px"></col>
        <col width="50px"></col>
        <col width="50px"></col>
        <col width="50px"></col>
        <col width="50px"></col>
        <col width="50px"></col>
        <col width="50px"></col>
        <col width="200px"></col>
        <col></col>
        
        <tbody id="tableQueryMember">
             
        </tbody>
         
    </table>
    <form action="${basePath }parreserve/pageQueryMemberList.shtml" method="post" id="formQueryMember">
							<input type="hidden" name="memName" id="ajaxmemName"  >
							<input type="hidden" name="pageSize" value="4000"> 
							<input type="hidden" name="pageNo" value="1">  
		</form>
    </div>
</div>
    
    
    
    </div>
        <div class="clear"></div>
      <div class="btm_btn mt10">
		<dl>
		<dd><input type="button" onclick="$('#setQueryMember').window('close')" class="btn" value="关闭" ></dd>
		</dl>
	</div>
</div>
<!---会员条件查询--->


</body>
</html>